home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / graphics / 3dvect30.arj / PMODE.INC < prev    next >
Text File  |  1993-11-18  |  2KB  |  65 lines

  1. extrn   v86r_eax:dword, v86r_ebx:dword, v86r_ecx:dword, v86r_edx:dword
  2. extrn   v86r_esi:dword, v86r_edi:dword, v86r_ebp:dword
  3. extrn   v86r_ah:byte, v86r_al:byte, v86r_bh:byte, v86r_bl:byte
  4. extrn   v86r_ch:byte, v86r_cl:byte, v86r_dh:byte, v86r_dl:byte
  5. extrn   v86r_ax:word, v86r_bx:word, v86r_cx:word, v86r_dx:word
  6. extrn   v86r_si:word, v86r_di:word, v86r_bp:word
  7. extrn   v86r_ds:word, v86r_es:word, v86r_fs:word, v86r_gs:word
  8. extrn   _selcode:word, _seldata:word, _selzero:word, _lomembase:dword
  9. extrn   _lomemtop:dword, _himembase:dword, _himemtop:dword, _pspa:dword
  10. extrn   _code16a:dword, _code32a:dword, _getirqvect:dword, _setirqvect:dword
  11. extrn   _sysbyte0:byte, _irqmode:word
  12.  
  13. extrn   _getmem:near, _getlomem:near, _gethimem:near, _lomemsize:near
  14. extrn   _himemsize:near, _ret:near, _exit:near, _getirqmask:near
  15. extrn   _setirqmask:near
  16.  
  17. ; Convert physical pointer to realative pointer
  18. @rlp    macro reg, ptr
  19.         mov ®,&ptr
  20.         sub ®,_code32a
  21. endm
  22.  
  23. ; Convert realative pointer to physical pointer
  24. @php    macro reg, ptr
  25.         mov ®,&ptr
  26.         add ®,_code32a
  27. endm
  28.  
  29. ; Output a byte to DX
  30. @outb           macro   val
  31.         mov al,&val
  32.         out dx,al
  33. endm
  34.  
  35. ; Output a word to DX
  36. @outw           macro   val
  37.         mov ax,&val
  38.         out dx,ax
  39. endm
  40.  
  41. ; Get interrupt flag status
  42. @gif    macro
  43.         mov ax,902h
  44.         int 31h
  45. endm
  46.  
  47. ; Get interrupt flag status and clear
  48. @gifc   macro
  49.         mov ax,900h
  50.         int 31h
  51. endm
  52.  
  53. ; Get interrupt flag status and set
  54. @gifs   macro
  55.         mov ax,901h
  56.         int 31h
  57. endm
  58.  
  59. ; Get interrupt flag status and set to AL (0=clear, 1=set)
  60. @gifal  macro
  61.         mov ah,9
  62.         int 31h
  63. endm
  64.  
  65.